<template>
  <div>
    <van-nav-bar
      title="消息详情"
      left-arrow
      @click-left="onClickLeft"
    />
    <div class="page">
      <div class="title">
        <div>{{ Arr.title }}</div>
        <div>{{ Arr.createTime }}</div>
      </div>
      <div>发布人：{{ Arr.sourceName }}</div>
      <div>{{Arr.msgDate}}</div>
    </div>
  </div>
</template>

<script>
import { MessageXQ } from "../request/api";
export default {
  data() {
    return {
      Arr: [],
      active:0
    };
  },
  created() {
    let id = this.$route.query.id;
    this.active = this.$route.query.active;
    MessageXQ({ id: id }).then((res) => {
      this.Arr = res.data;
    });
  },
  methods:{
      onClickLeft(){
           this.$router.push({
            path: "/message",
            query: {
              active:this.active
            },
            
          });
      }
  }
};
</script>
 
<style lang = "less" scoped>
.page {
  background-color: #fff;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 10px;
        line-height: 30px;
}
.title {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  div:nth-of-type(1) {
    color: #333
  }
  div:nth-of-type(2) {
    color: #ccc;
  }

}
/deep/ .van-nav-bar__content {
  background: #003399;
  .van-nav-bar__title {
    color: #fff;
  }

  .van-icon {
    color: #fff;
  }
}
</style>